#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int N = 1e5 + 10;
int arr[N];
int gcd(int a, int b)
{
	return b ? gcd(b, a % b) : a;
}
int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &arr[i]);
	}
	sort(arr, arr + n);
	int d = 0;
	for (int i = 1; i < n; i++) {
		d = gcd(d, arr[i] - arr[i - 1]);
	}
	if (d == 0) {
		//cout << n << endl;
		printf("%d", n);
	}
	else {
		printf("%d", (arr[n - 1] - arr[0]) / d + 1);
	}
	return 0;
}